/*
 * @Author: your name
 * @Date: 2021-05-26 15:45:50
 * @LastEditTime: 2021-05-26 15:47:06
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /vite-project/src/components/Application/src/useAppContext.ts
 */

import { InjectionKey, Ref } from 'vue';
import { useContext, createContext } from '@/hooks/core/useContext';

export interface AppProviderContextProps {
    prefixCls: string;
}

const key: InjectionKey<AppProviderContextProps> = Symbol();

export function createAppProviderContext(context: AppProviderContextProps) {
    return createContext<AppProviderContextProps>(context, key);
}

export function useAppProviderContext() {
    return useContext<AppProviderContextProps>(key);
}
